Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf(macOS): Cache DisplayInformation properties #9114

Merged
merged 2 commits into from
Jun 24, 2022

Conversation

spouliot
Copy link
Contributor

GitHub Issue (If applicable): closes #9098

PR Type

What kind of change does this PR introduce?

  • Refactoring (no functional changes, no api changes)

What is the current behavior?

Calling DisplayInformation properties requires several, slow native (ObjC) calls.

What is the new behavior?

Subscribe to notifications to let us know the NSWindow (macOS) or UIScreen (macOS) have changed screen (or resolution) so we can cache the values between calls.

PR Checklist

Please check if your PR fulfills the following requirements:

Other information

Internal Issue (If applicable):

@gitpod-io
Copy link

gitpod-io bot commented Jun 23, 2022

@spouliot
Copy link
Contributor Author

Draft until the iOS version is added.

@spouliot spouliot marked this pull request as ready for review June 23, 2022 18:22
@spouliot spouliot requested a review from a team June 23, 2022 18:22
@jeromelaban jeromelaban enabled auto-merge June 23, 2022 23:57
@jeromelaban jeromelaban merged commit ad8ffc7 into unoplatform:master Jun 24, 2022
@spouliot spouliot deleted the gh9098 branch June 24, 2022 13:41
@spouliot spouliot mentioned this pull request Jun 25, 2022
71 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[macOS][iOS] Proposal to cache [NS|UI]Screen.MainScreen derived data
2 participants